The name attribute does not expose the set of <details> as a named group. I wanted to mention this here because I see some confusion among developers as to what the name attribute really does.

The HTML standard defines the behavior of the name attribute saying that “the name content attribute gives the name of the group of related details elements that the element is a member of.”

The “name of the group” referred to in this paragraph is not the accessible name of the group. The value of the name attribute is not exposed to screen readers. And the name attribute does not contribute to the accessible name computation of the group. We will learn about accessible names and how they are computed by the browser in up-and-coming chapters.

To give the group a meaningful role and name, you’ll want to group the <details> and give the group a name the way we did in the previous section.



Level up your accessibility knowledge with the Practical Accessibility course!

I created a self-paced, get-right-down-to-it online video course for web designers and developers who want to start creating more accessible Web user interfaces and digital products today.

The course is now open for enrollment!